﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace 类继承静态成员的关系
{
    class Program
    {
        enum en
        {
            类=0x00,
            继=0x01,
            承=0x02,
        }
        static void Main(string[] args)
        {
            //B b = new B();
            //b.aa = 1;
            byte[] buf = new byte[6];
            for (byte i = 0; i < 6; i++) buf[i] = (byte)(i+1);

            for (int i = 0; i < buf.Length; i++) Console.WriteLine(buf[i].ToString());
            calc(buf);
            for (int i = 0; i < buf.Length; i++) Console.WriteLine(buf[i].ToString());

            Console.WriteLine(((en)1).ToString());//这里转换出来为  继  字
            Console.ReadKey();
        }

        static void calc(byte[] buf)
        {
            buf[buf.Length - 1] = (byte)(buf[0] + buf[1]);

        }
    }

    ///// <summary>
    ///// struct不能派生
    ///// </summary>
    //public struct A
    //{
    //    public int aa;
    //}
    ///// <summary>
    ///// struct只能继承接口
    ///// </summary>
    //public struct B : A
    //{

    //}
}
